package com.chaodev.base.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author zyf
 * @description 打卡中心点实体类
 * @date 2023-09-20 14:44
 */
@Data
public class ClockDistance implements Serializable {
    private static final long serialVersionUID = -5836523856994395919L;

    @ApiModelProperty("主键")
    private Integer id;

    @ApiModelProperty("部门编码")
    private String departId;

    @ApiModelProperty("坐标系（WGS-84、GCJ-02、CGCS2000、BD-09）")
    private String csys;

    @ApiModelProperty("经度")
    private BigDecimal lng;

    @ApiModelProperty("纬度")
    private BigDecimal lat;

    @ApiModelProperty("最大打卡距离(米)")
    private Integer distance;

    @ApiModelProperty("有效状态（0无效1有效）")
    private Integer state;

    @ApiModelProperty("创建人")
    private String createUser;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @Override
    public String toString() {
        return "{" +
                "\"id\":" + id +
                ",\"departId\":" + (departId == null ? null : "\"" + departId + "\"") +
                ",\"csys\":" + (csys == null ? null : "\"" + csys + "\"") +
                ",\"lng\":" + lng +
                ",\"lat\":" + lat +
                ",\"distance\":" + distance +
                ",\"state\":" + state +
                ",\"createUser\":" + (createUser == null ? null : "\"" + createUser + "\"") +
                ",\"createTime\":" + (createTime == null ? null : "\"" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTime) + "\"") +
                "}";
    }
}
